package com.ehome.poct.base.api.feign.device;

import com.ehome.core.page.Page;
import com.ehome.poct.base.api.dto.device.HardwareVersionReqDTO;
import com.ehome.poct.base.api.dto.device.TestDeviceVersionAddDTO;
import com.ehome.poct.base.api.dto.device.TestDeviceVersionUpdDTO;
import com.ehome.poct.base.api.dto.device.VersionStatusQry;
import com.ehome.poct.base.api.qry.TestDeviceVersionQry;
import com.ehome.poct.base.api.vo.device.TestDeviceVersionSelVO;
import com.ehome.poct.base.api.vo.device.TestDeviceVersionVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


@FeignClient(value = "${service.poct-base:}${service.suffix.poct-base:}",contextId = "testDeviceVersion",path = "/test_device_version")
public interface TestDeviceVersionFeginClient {
    @PostMapping
    public void insert(@RequestBody @Validated TestDeviceVersionAddDTO dto);
    
    @PutMapping("/{id}")
    public void update(@PathVariable("id") String id,@RequestBody TestDeviceVersionUpdDTO dto);
    
    @GetMapping("/{id}")
    public TestDeviceVersionVO selectById(@PathVariable("id") String id);
    
    @PostMapping("/pubVersion")
    public void pubVersion(@RequestBody HardwareVersionReqDTO reqDto);
    
    @GetMapping("/page")
    public Page<TestDeviceVersionSelVO> pageQuery(@SpringQueryMap TestDeviceVersionQry qry);
    
    @PostMapping("/updateStatus")
    public void updateStatus(@RequestBody VersionStatusQry qry);
}
